<?php
namespace app\home\validate;

use think\Validate;

class Login extends Validate
{
    protected $rule = [
        'mobile' => ['require', 'regex:/^1(3|5|7|8|9)\d{9}$/'],
        'password' => 'require',
    ];

    protected $message = [
        'mobile.require' => '手机号真的不能为空',
        'mobile.regex' => '手机号格式又错了',
        'password.require' => '密码真的不能为空'
    ];
}